package cn.com.cifi.mars.mapper.mars;

import cn.com.cifi.mars.entity.DmDmPlanSignMonth;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface DmDmPlanSignMonthMapper extends BaseMapper<DmDmPlanSignMonth> {

    void delByProjectIdAndSnapshootYearMonth(@Param("projectId") String projectId,@Param("yearMonth") Integer yearMonth);

    void delBySnapshootYearMonth(@Param("yearMonth")Integer yearMonth);

    void insertList(@Param("list")List<DmDmPlanSignMonth> monthList);

    /**
     * 查询指定项目、数据归属时间、年份的数据
     * @param projectIdList
     * @param yearMonth
     * @param year
     * @return
     */
    List<DmDmPlanSignMonth> selectByYearAndProjectId(@Param("list") List<String> projectIdList,@Param("yearMonth")Integer yearMonth,
                                                                       @Param("year") String year);

    /**
     * 查询指定项目、数据归属时间的数据
     * @param projectIdList
     * @param yearMonth
     * @return
     */
    List<DmDmPlanSignMonth> selectByProjectIdListAndSnapshootYearMonth(@Param("list") List<String> projectIdList,@Param("yearMonth")Integer yearMonth);

    /**
     * 查询指定数据归属时间、年份的数据
     * @param yearMonth
     * @param year
     * @return
     */
    List<DmDmPlanSignMonth> selectByYear(@Param("yearMonth")Integer yearMonth, @Param("year") String year);

    /**
     * 查询全部数据
     * @return
     */
    List<DmDmPlanSignMonth> selectAll();

    /**
     * 查询全盘供货与签约
     * @param projectIdList
     * @param yearMonth
     * @return
     */
    List<DmDmPlanSignMonth> getOverallList(@Param("list") List<String> projectIdList,@Param("yearMonth")Integer yearMonth);
}
